#include "proc.h"


void Count()
{
  int i=9;
  while(i){
    printf("%2d\r",i);
    fflush(stdout);
    sleep(1);
    i--;
  }
}


void ProcBar()
{
  int i=0;
  char proc[102];
  memset(proc,'\0',sizeof(proc));
  const char* lable ="|/-\\";
  while(i<=100)
  {
    printf("[\033[0m\033[1;34m%-100s\033[0m][%d%%][%c]\r",proc,i,lable[i%4]);
    fflush(stdout);
    proc[i] = '#';
    usleep(30000);
    i++;
  }
  printf("\n");
}
